import request from '@/utils/request'

export default {
  getList(currentPage, pageSize, leagueQueryVo) {
    return request({
      url: `/league/search/${currentPage}/${pageSize}`,
      method: 'post',
      data: leagueQueryVo
    })
  },

  remove(id){
    return request({
      url: `/league/${id}`,
      method: 'delete',
    })
  },

  add(league, dynamicTags){
    return request({
      url: `/league/${dynamicTags}`,
      method: 'post',
      data: league
    })
  },

  getById(id){
    return request({
      url: `/league/${id}`,
      method: 'get',
    })
  },

  edit(league, dynamicTags){
    return request({
      url: `/league/${dynamicTags}`,
      method: 'put',
      data: league
    })
  },

  queryAll(){
    return request({
      url: `/league`,
      method: 'get',
    })
  },

  addCardRelation(leagueId, cardList){
    return request({
      url: `/league/relation/${leagueId}`,
      method: 'post',
      data: cardList
    })
  }
}
